<?php
/**
 * \class event_registration_handler
 * \brief This class handles event registration by business user.
 * \author Salman Noor
 */
class event_registration_handler
{

   /**
   * \brief Object to be able use the html_builder class functionality.
   */
   private $html_buillder;

    /**
     * \brief Constructor to initialise html_elements_builder object.
     */
   public function  __construct() {
    $this->html_buillder = new html_elements_builder();
    }


    /**
     * \brief Builds html content for event form registration.
     * \return Html content for event form registration.
     */
    private function buildEventRegistrationForm()
    {
        $eventForm ="<div style =' border: 1px solid transparent; padding: 7px' class='errorMessageDiv'> </div>";
        $eventForm .= "<div id='leftImageUploadContainer' class='ui-widget-content ui-corner-all'style='border:1px solid #CCCCCC;padding:20px 20px 20px 20px; float:right;'> ";
        $eventForm .= "<h3>Upload Event Image</h3>";
        $eventForm .= $this->html_buillder->buildButton("goToImageUploadPage", "Upload Image", "imageUpload");
        $eventForm .="</div>";
        $eventForm .= $this->html_buillder->buildTextInput('eventName', null, 'eventName', TRUE, "Event Name",'top','45')."<br><br>";
        $eventForm .= $this->html_buillder->buildTextArea("eventDescription",'',"eventDescription", TRUE, 'Enter a Brief Desciption of your Facility','top',8,57)."<br><br>";
        $eventForm .= $this->html_buillder->buildTextInput('eventWebsite', null, 'eventWebsite', TRUE, "Enter your website address (optional)",'top','45')."<br><br>";
        $eventForm .= $this->html_buillder->buildTextArea("eventAddress",'',"eventAddress", TRUE, 'Enter the Street Address of your Facility','top',4,57)."<br><br>";
        $this->html_buillder->addOption('Archeological', 'Archeological');
        $this->html_buillder->addOption('Agritourism', 'Agritourism');
        $this->html_buillder->addOption('Bicycle touring', 'Bicycle touring');
        $this->html_buillder->addOption('Boat sharing', 'Boat sharing');
        $this->html_buillder->addOption('Bookstore tourism', 'Bookstore tourism');
        $this->html_buillder->addOption('Culinary', 'Culinary');
        $this->html_buillder->addOption('Cultural', 'Cultural');
        $this->html_buillder->addOption('Dark tourism', 'Dark tourism');
        $this->html_buillder->addOption('Disaster tourism', 'Disaster tourism');
        $this->html_buillder->addOption('Garden', 'Garden');
        $this->html_buillder->addOption('Geotourism', 'Geotourism');
        $this->html_buillder->addOption('Heritage tourism', 'Heritage tourism');
        $this->html_buillder->addOption('Militarism heritage', 'Militarism heritage');
        $this->html_buillder->addOption('Music', 'Music');
        $this->html_buillder->addOption('Nautical', 'Nautical');
        $this->html_buillder->addOption('Pop-culture', 'Pop-culture');
        $this->html_buillder->addOption('Religious', 'Religious');
        $this->html_buillder->addOption('River cruise', 'River cruise');
        $this->html_buillder->addOption('Rural', 'Rural');
        $this->html_buillder->addOption('Sacred travel', 'Sacred travel');
        $this->html_buillder->addOption('Safari', 'Safari');
        $this->html_buillder->addOption('Scenic route', 'Scenic route');
        $this->html_buillder->addOption('Self-guided tour', 'Self-guided tour');
        $this->html_buillder->addOption('Space tourism', 'Space tourism');
        $this->html_buillder->addOption('Sports tourism', 'Sports tourism');
        $this->html_buillder->addOption('Virtual tour', 'Virtual tour');
        $this->html_buillder->addOption('Walking tour', 'Walking tour');
        $this->html_buillder->addOption('War tourism', 'War tourism');
        $this->html_buillder->addOption('Water tourism', 'Water tourism');
        $this->html_buillder->addOption('Whale watching', 'Whale watching');
        $this->html_buillder->addOption('Wildlife', 'Wildlife');
  $eventForm .=  $this->html_buillder->buildMultiSelectableDropDown('eventType',"Select Possible Categories that Fit for your Event (Optional)",'top','15');
  $eventForm .=  $this->html_buillder->buildCheckBox("selectOtherButton","Insert Other Categories")."<br>";
  $eventForm .= "<div id='addOtherCategoriesDiv' class='ui-widget-content ui-corner-all'style=' width:50%;border:1px solid #CCCCCC;padding:20px 20px 20px 20px;'>";
  $eventForm .= $this->html_buillder->buildTextArea("manualEventCategory",'',"manualEventCategory", TRUE, 'Insert Possible Categories that Fit for your Event <i> Seperated by Spaces</i> (Optional)','top',3,57)."<br><br>";
  $eventForm .="</div><br>";
    $eventForm .= "<div id='serviceTimesDiv' class='ui-widget-content ui-corner-all'style='width:50%; border:1px solid #CCCCCC;padding:20px 20px 20px 20px;'>";
  $eventForm .= $this->html_buillder->buildButton("timeSelector","Select Service Times for your facility","timeSpanSelector")."<div id='setServiceTimesDiv' class='ui-widget-content ui-corner-all'style='border:1px solid #CCCCCC;padding:20px 5px 20px 5px;'></div>";
  $eventForm .="</div>";
  $eventForm .= "<div id='eventLocationDiv' class='ui-widget-content ui-corner-all'style='width:50%; border:1px solid #CCCCCC;padding:20px 20px 20px 20px;'>";
  $eventForm .= $this->html_buillder->buildButton("eventLocationSelector","Select the location of the event","coordinatesSelector")."<div id='setEventLocation' class='ui-widget-content ui-corner-all'style='border:1px solid #CCCCCC;padding:20px 5px 20px 5px;'></div>";
  $eventForm .="</div>";
    $eventForm .= $this->html_buillder->buildButton("submitEvent","Register Event","registerEvent");
  return $eventForm;
    }


    /**
     * return Returns html content for diologue box
     */
    private function buildConfirmDialogBox()
    {
      return $this->html_buillder->buildDialogueBoxWithContent('dialogue-confirm','Confirm','confirmMessage','fsdfsd');
    }


    /**
     * \brief Builds html content for the Event Selector.
     * \return Returns Event Location Selector html content.
     */
    private function buildEventLocationSelector()
    {
        return $this->html_buillder->buildDialogueBoxWithContent('dialog-event-location-map',"Event Location Selection","googleMapContent","None");
    }

    
    /**
     * \brief Builds html content for the Time Selector.
     */
    private function buildTimeSelector()
    {


       return $this->html_buillder->buildDialogueBoxWithContent('dialogue-time-selector','Select Active Times',
                "timeSelectorContainer","<div style =' border: 1px solid transparent; padding: 7px' class='errorMessageDiv'> </div>
                    <div>
                   <p>
                   <span class=\"ui-icon ui-icon-clock\" style='float:left; margin:0 7px 20px 0;'>
                   </span>
                   Select an active time span in which your facility operates. Multiple non-conflicting time spans can be entered. Move the sliders to the desired start and stop times for various events.
                   </p>
                   </div>
                    <div id='slider-range'></div><span id='time'></span><br><br>".
                   $this->html_buillder->buildTextInput('eventNameForTimeSpan', null, 'eventNameForTimeSpan', TRUE, 'Enter the name of activity being conducted during this time span','top','65')."<br><br>".
                $this->html_buillder->buildTextArea("activityDescription", null, "activityDescritionTA", true, "Describe the activity in detail", "top","5","63")."<br><br>".
                $this->html_buillder->buildTextArea("activityRequirement", null, "activityRequirementTA", true, "List the requirements <i>if any</i> for this activity", "top","5","63"));

    }

     /**
     * \brief Builds html content for the OK message box.
     * \return Returns content for the OK message box..
     */
        private function buildEventRegistrationOKMessageBox()
    {
      return $this->html_buillder->buildSimpleDialogueBox('dialog-eventRegOKMessage', 'Event Registration is Successful', 'Event Registration is successful. Please select the <i>\'View Registered Events\'</i> tab to view the details of your event anytime.', 'ui-icon-circle-check');
    }

     /**
     * \brief Builds html content for the registration form.
     * \return Returns html content for the registration form.
     */
    public function showEventRegistrationForm()
    {
        return $this->buildEventRegistrationForm();
    }


     /**
     * \brief Builds html content for the Time Selector Modal window.
     * \return Returns html content for the Time Selector Modal window.
     */
    public function showTimeSelectorModalWindow()
    {
        return $this->buildTimeSelector();
    }


    /**
     * \brief Builds html content for the OK message box.
     * \return Returns html content for the OK message box.
     */
    public function showEventRegistrationOKMessageBox()
    {
       return $this->buildEventRegistrationOKMessageBox();
    }


    /**
     * \brief Builds html content for the confirmationn dialog box.
     * \return Returns html content for the confirmationn dialog box.
     */
    public function showConfirmDialogBox()
    {
        return $this->buildConfirmDialogBox();
    }

    /**
     * \brief Builds html content for the event location selector.
     * \return Returns html content for the event location selector.
     */
    public function showEventLocationSelector()
    {
        return $this->buildEventLocationSelector();
    }
}
?>
